package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 采购车实体类
 */
@TableName("t_buyerCar")
public class BuyerCarBean {
    //    采购车编号
    @TableId(value = "pk_buyerCarId", type = IdType.AUTO)
    private Integer id;

    //    采购的商品实体类
    @TableField(exist = false)
    private ProductBean product;

    //    采购的商品编号
    @TableField("fk_productId")
    private String productId;

    //    采购数量
    @TableField("bc_num")
    private Integer num;

    //    采购价格
    @TableField("bc_buyMoney")
    private Integer buyMoney;

    //    采购用户实体类
    @TableField(exist = false)
    private UserBean user;

    //    采购用户的编号
    @TableField("fk_userId")
    private Integer userId;

    public BuyerCarBean() {
    }

    public BuyerCarBean(String productId, Integer num, Integer buyMoney, Integer userId) {
        this.productId = productId;
        this.num = num;
        this.buyMoney = buyMoney;
        this.userId = userId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public ProductBean getProduct() {
        return product;
    }

    public void setProduct(ProductBean product) {
        this.product = product;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getBuyMoney() {
        return buyMoney;
    }

    public void setBuyMoney(Integer buyMoney) {
        this.buyMoney = buyMoney;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "BuyerCarBean{" +
                "id=" + id +
                ", product=" + product +
                ", productId=" + productId +
                ", num=" + num +
                ", buyMoney=" + buyMoney +
                ", user=" + user +
                ", userId=" + userId +
                '}';
    }
}
